{__NOLAYOUT__}
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport"
		  content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
	<title>设置</title>
	{include file="public/script" /}
</head>
<body>
	<div class="sectionH  sectionH2 mui-clearfix">
		<header class="mui-bar mui-bar-nav" style="">
			<a class="mui-icon mui-icon-left-nav  mui-pull-left" href="javascript:history.back(-1)" style="color: #727272;"></a>
			<h1 class="mui-title">个人简介</h1>
			<!--<a class="mui-icon mui-pull-right right1" href="assets-1.html"><img src="images/icon_setting.png"/></a>-->
		</header>
	</div>
	<div class="kong1"></div>
	<div class="set_yijian_section1">
		<div class="container">
			<form action="" method="post">
				<div class="f4 mui-clearfix">
					<textarea id="content" rows="8" cols="" placeholder="请输入个人简介" >{$info.abstract}</textarea>
				</div>
				
				<div class="sub">
					<input type="button" style="color: #fff;" value="确定"/>
				</div>
			</form>
		</div>
		
	</div>
	
</body>
<script>
    $('.sub').click(function () {
        if($('#content').val()==''){mui.alert('请输入个人简介！');return false;}
        if($('.sub').hasClass('sending')){
            mui.toast('提交中...');
            return false;
        }
        var content=$('#content').val();

        $.ajax({
            type:'post',
            url:"{:url('Set/setabstract')}",
            data:{content:content},
            cache:false,
            dataType:'JSON',
            success:function(data){
                if(data.result_code==='0000'){
                    mui.toast('个人简介提交成功');
                    setTimeout(function () {
						window.history.back();
                    },2000);
                    $(".sub").removeClass('sending');
                }else if(data.result_code==='1111'){
                    mui.alert('请登录','',function(){
                        window.location.href='/Login/login';
                    });
                }else{
                    mui.alert(data.result_info);
                    $(".sub").removeClass('sending');
                }

            },
            error:function(e){
                $(".sub").removeClass('sending');
            },
            beforeSend:function(e){
                $(".sub").addClass('sending');
            }
        });
    });

</script>
</html>